<script setup>
import { ref } from 'vue';
import { useListStore } from '@/stores/list';
const store = useListStore();
const text = ref('')
const add = () => {
    store.addItem(text.value)
}
</script>
<template>
    <h1>待办事项</h1>
    <input v-model="text" type="text">
    <button @click="add">添加</button>
</template>